#if 0
#  warning Debug ON
#  define MEM_DEBUG 1
#  define free(p) debug_free(p)
#  define malloc(s) debug_malloc(s)
#  define realloc(p,s) debug_realloc(p,s)
#  define ndb_free(p) ({debug_fake_malloc(p); free(p);})
#else
#  define MEM_DEBUG 0
#  define ndb_free(p) free(p)
#endif

extern void *debug_malloc(size_t);
extern void *debug_realloc(void *, size_t);
extern void debug_free(void *);
extern void debug_fake_malloc(void *);

extern void debug_abort(int);
